<template>
  <div>
    <el-row>
      <el-col :span="8" v-for="item in tableData" >
        <el-card class="box-card" v-infinite-scroll="load">
          <div slot="header" class="clearfix">
            <el-button type="primary"  plain disabled size="small">{{item.code}}</el-button>
            <el-button type="primary"  plain disabled size="small">{{item.state|statefmt}}</el-button>
          </div>
          <div class="text item">
            <el-row>
              <el-col :span=18 style="margin-top: 10px">
                下单时间：{{item.createDate|formatDate}}
              </el-col>
              <el-col :span=18 style="margin-top: 10px">
                联系人名称：{{item.customerName}}
              </el-col>
              <el-col :span=18 style="margin-top: 10px">
                联系人名称：{{item.linkmanName}}
              </el-col>
              <el-col :span=18 style="margin-top: 10px">
                联系电话：{{item.linkmanTel}}
              </el-col>
              <el-col :span=18 style="margin-top: 10px">
                税前价格：￥{{item.price}}
              </el-col>
              <el-col :span=18 style="margin-top: 10px">
                税率：{{item.taxRate}}%
              </el-col>
              <el-col :span=18 style="margin-top: 10px">
                税后价格：￥{{item.priceIt}}
              </el-col>
            </el-row>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
  export default {
    name: 'CustomerOrder',
    data(){
      return{
        tableData:[]
      }
    },
    methods:{
      getOrderByState:function (id,cus) {//根据状态进行订单查询
        this.$http.post("/order/getOrderByState/"+id+"/"+cus).then((res) => {
          this.tableData=res.data.result
        });
      }
    },
    mounted () {
      var id =this.$route.query.id
      var loginUser =this.$route.query.loginUser
      this.getOrderByState(id,loginUser)
    }
  }
</script>

<style scoped>

</style>
